﻿using Daitto.Entity;
using Prism.Commands;
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace WpfAppTest.ViewModels
{
    public class Test2ViewModel : BindableBase
    {
        public string BContent = "AAA";
        public string TEST2c
        {
            get { return BContent; }
            set { SetProperty(ref BContent, value); }
        }
        private readonly IClass1Test2<ClassTest> _Class1Test2;
        private ClassTest _tClassTest;
        public ClassTest tClassTest
        {
            get { return _tClassTest; }
            set { SetProperty(ref _tClassTest, value); }
        }
        public Test2ViewModel(IClass1Test2<ClassTest> class1Test2)
        {
            _Class1Test2= class1Test2;
        }
        private DelegateCommand<string> _faceImgShowConLoadedcmd;
        public DelegateCommand<string> FaceImgShowConLoadedcmd =>
        _faceImgShowConLoadedcmd ?? (_faceImgShowConLoadedcmd = new DelegateCommand<string>(
        (p) =>
        {
            tClassTest = _Class1Test2.tClassTest;
        }));
        private DelegateCommand<string> _Commd1;
        public DelegateCommand<string> Commd1 =>
        _Commd1 ?? (_Commd1 = new DelegateCommand<string>(
        (p) =>
        {
            tClassTest.Locations = "ssssssssssssss";
            MessageBox.Show(_Class1Test2.tClassTest.Locations);
            for (int i = 0; i <0; i++) {
                MessageBox.Show("uuuuuuuuu");
            }
        }));

    }
}
